{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Coding with Qiskit Episode 6\n",
    "\n",
    "# Bernstein-Vazirani Algorithm\n",
    "\n",
    "#### Written by Abraham Asfaw, IBM TJ Watson Research Center"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In this episode of Coding with Qiskit, we learned about the Bernstein-Vazirani algorithm. Briefly, the Bernstein-Vazirani algorithm allows us to determine a secret number stored inside a box. Mathematically, the problem statement that we are solving is the following:\n",
    "\n",
    "Consider a hidden Boolean function $f$ which takes in a string of $n$ bits $\\{x_0, x_1, \\ldots x_{n-1}\\}$ and returns 1 for only a unique n-bit string $s = \\{s_0, s_1, \\ldots s_{n-1}\\}$ and 0 otherwise.\n",
    "\n",
    "How many attempts do we need to make in order to find the secret number $s$?\n",
    "\n",
    "Classically, we covered two approaches. \n",
    "\n",
    "For an **n-bit secret number**, the first approach is to try all possible numbers from 0 to $2^n-1$. **This leads to an exponential number of attempts as $n$ grows.**\n",
    "\n",
    "The second approach assumes that if the box isn't just giving a yes/no result if the number matches, but instead computes $s.x$ modulo 2, (this is a yes/no result as well, but we are now computing the bitwise AND between the two numbers $s$ and $x$, and adding up the results, and finally returning the sum modulo 2) then we can be a bit more clever and give the box $n$ different inputs (namely $2^0, 2^1, 2^2, \\ldots, 2^{n-1}$) to reveal each of its bits. Check out the video to see how this works. **This method means that we would need to make $n$ attempts to find the secret number.**\n",
    "\n",
    "**The Bernstein-Vazirani algorithm allows us to find the secret number in 1 attempt, independent of the size of the secret number.** For the mathematics behind how the algorithm works, [check out the Bernstein-Vazirani section in our open-source Qiskit textbook](https://community.qiskit.org/textbook/ch-algorithms/bernstein-vazirani.html).\n",
    "\n",
    "The algorithm was [described by Ethan Bernstein and Umesh Vazirani](#1).\n",
    "\n",
    "**Link to Episode 6:** https://www.youtube.com/watch?v=sqJIpHYl7oo"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "\n",
       "        <iframe\n",
       "            width=\"960.0\"\n",
       "            height=\"540.0\"\n",
       "            src=\"http://www.youtube.com/embed/sqJIpHYl7oo\"\n",
       "            frameborder=\"0\"\n",
       "            allowfullscreen\n",
       "        ></iframe>\n",
       "        "
      ],
      "text/plain": [
       "<IPython.lib.display.IFrame at 0x110741e80>"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from IPython.display import IFrame\n",
    "IFrame(src=\"http://www.youtube.com/embed/sqJIpHYl7oo\", width=1920/2, height=1080/2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Building the circuit for the Bernstein-Vazirani algorithm"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We begin by writing down the secret number."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "s = '110101'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Then, let's import Qiskit to begin building the circuit."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "from qiskit import *"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The algorithm requires $n+1$ qubits and $n$ classical bits, where $n$ is the length of the secret number."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "n = len(s)\n",
    "\n",
    "circuit = QuantumCircuit(n+1,n)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The algorithm has four main parts.\n",
    "\n",
    "0. **Initialize the first $n$ qubits in the state $\\vert0\\rangle$, and the last qubit in the $\\vert1\\rangle$ state.** In Qiskit, all qubits are initialized in the $\\vert0\\rangle$ state, so we don't need to do anything to the first $n$ qubits. For the last qubit, we initialize it to $\\vert1\\rangle$ state by applying an $X$ gate.\n",
    "\n",
    "1. **Apply Hadamard gates to all qubits.**\n",
    "\n",
    "2. **Build the box containing the secret number (also known as an \"oracle\").** We will build it as a function that computes $s.x$ modulo 2 by applying $CX$ gates from the first $n$ qubits onto the last qubit whenever there is a $1$ in the secret number. We will do this in reverse order, meaning that the there will be a $CX$ gate from the $n$th qubit to the last qubit if the first bit of the secret number is 1. \n",
    "\n",
    "3. **Measure the first $n$ qubits in the Bell basis.** This means applying Hadamard gates to the first $n$ qubits again before applying measurements."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<qiskit.circuit.instructionset.InstructionSet at 0x1377b1a58>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Step 0\n",
    "\n",
    "circuit.x(n) # the n+1 qubits are indexed 0...n, so the last qubit is index n\n",
    "\n",
    "circuit.barrier() # just a visual aid for now\n",
    "\n",
    "# Step 1\n",
    "\n",
    "circuit.h(range(n+1)) # range(n+1) returns [0,1,2,...,n] in Python. This covers all the qubits\n",
    "\n",
    "circuit.barrier() # just a visual aid for now\n",
    "\n",
    "# Step 2\n",
    "\n",
    "for ii, yesno in enumerate(reversed(s)):\n",
    "    if yesno == '1': \n",
    "        circuit.cx(ii, n)\n",
    "    \n",
    "circuit.barrier() # just a visual aid for now\n",
    "\n",
    "# Step 3\n",
    "\n",
    "circuit.h(range(n+1)) # range(n+1) returns [0,1,2,...,n] in Python. This covers all the qubits\n",
    "\n",
    "circuit.barrier() # just a visual aid for now\n",
    "\n",
    "circuit.measure(range(n), range(n)) # measure the qubits indexed from 0 to n-1 and store them into the classical bits indexed 0 to n-1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA4kAAAGMCAYAAAB3fOfPAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/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2cOFE33nijiT8BALtz3JBYXV2tWbNmqUePHmrSpIn69OmjvLw89ezZU6NHjzY7Hr6Xk5NjdoSgLRh/oTatXuCzzePxaN69LVWU/6ZJqYJnl1pXV0ubd0t//lB6ZoX0wirp4+1S5QmzkwGhYZdelFj3wqVFixZ68cUXtXbtWt1+++1yuVz6+OOP9fzzz+vRRx/V1KlT9frrr+urr75Sp06d9NRTT2nLli265ZZbvANiVFSUnnzySa1YscLsHweAjTnuctNRo0Zp+fLlevzxx5WSkqK1a9dqxIgRKisr04MPPmh2PNhMxbd7dLi8VO269PXZfvCbYh0/dkhx8ZeZlKxhOXZCWpAnFbkllySPav693S39c6M09nqpQyuTQwIOwboXHh06dNCqVauUlJSk48eP649//KNeeOEF7dmz54x9XS6XrrvuOk2dOlXXXnut/va3v6m6uloRERF68sknNXXqVBN+AgANiaOGxCVLlmjRokVas2aN0tLSJEnp6elat26dli9frn79+pmcEHbjLs6XKyJSMRdd4rN9X8kGNWsVpxYxnUxK1rD89ZOaAVGqGRBP/feho9Lc96XHbpYaR5uRDnAW1r3Qa9GihXdA3LJlizIyMrR58+az7u/xePT+++/rgw8+0MKFC/XrX/9aEREReu+99xgQAYSEoy43zcrK0uDBg70DYq3u3bsrOjpaycnJkqRdu3YpLS1NCQkJ6t27tz766CMz4jpaXl6e2RGC4i7OV5sOCYpq1MRne1nJBrXvao9X061e62++k774+uzf90j67qhUsMuoREB4WL0Xa7Huhd6sWbOUlJSkzZs3a8CAAX4HxFMNHz5cd955p1wulzwej9LT03XppZeGOS0AJ3DMmcTdu3dr06ZNdd7tq6SkRElJSWrcuLEk6b777tPtt9+usWPHau3atRo+fLh27typRo0ahSWby+UKy/NaVTB3XNuxY4e6devmd5/s7OxQRfIx4TVP4J2+5y7OV7m7SC+NifXZfqKyQpfd/Ei9jhuOPwdWr3UwUn/2iK7KyPK7T3V1lWYvytM1WdcblAqov0D9yLoXGnZb966++mqNHj1alZWVysjI0P79+4N63OnvQWzZsqUmTpyoBQsWKCU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9UvId7sKCEV8SWxublZSUlJmjBhgj755BNTMrDcFAAAAEAosdz0FlzvyE1NTSYnAQAAAADzRfxMoiRlZWXp2LFj2rZtmyorK284duTIEeXk5HTxmb3Tn2q26etvTurZ3/1WfWJjzI4DAAAAwEKsfa/ZMHnppZf0yCOPaMqUKZo+fbqysrLU1NSk3bt3a8SIEaqpqTE7Yo85efqM/vZFgyrLSiiIAAAAADqgJEqaM2eOEhMT9eqrr6q2tlYffvihXC6XRo4cqWeeecbseD3qbHOL+t9l7QeWAgAAADAPy00jUFtbm+z2iN+OCgAAAKATlEQAAAAAgIHpJAAAAACAgZIIAAAAADBQEgEAAAAABkoiAAAAAMBASQQAAAAAGCiJAAAAAAADJREAAAAAYKAkAgAAAAAMlEQAAAAAgIGSCAAAAAAwUBIBAAAAAAZKIgAAAADAQEkEAAAAABgoiQAAAAAAAyURAAAAAGCgJAIAAAAADJREAAAAAICBkggAAAAAMFASAQAAAAAGSiIAAAAAwEBJBAAAAAAYKIkAAAAAAAMlEQAAAABgoCQCAAAAAAyURAAAAACAgZIIAAAAADBQEgEAAAAAhv8H66I7jT8Obz0AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 1179.92x505.68 with 1 Axes>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "circuit.draw(output='mpl')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Running the Bernstein-Vazirani algorithm"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And finally, let's simulate the circuit on Aer's `qasm_simulator`. We will set the number of shots to 1."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAc0AAAFbCAYAAAC3etVDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAdh0lEQVR4nO3dfZRddX3v8ffXASS5QkjiNMlgUzJacRbSISS0NQhEIFbRtgpewYci+MDFB9AiarjXq8Vbda34BFdrEbRF0QLFqrU2FAhJhQIFQoIG06aGYnIlCUoelEZiQvzeP/YOHiYzk98JM3NOct6vtc6as3/7t/f57j/Ih/30+0VmIkmS9uwZrS5AkqR9haEpSVIhQ1OSpEKGpiRJhQxNSZIKHdDqAlpp8uTJOX369FaXIUlqI/fff/+jmdk92LqODs3p06ezePHiVpchSWojkyZNWjPUOi/PSpJUyNCUJKmQoSlJUiFDU5KkQoamJEmFDE1JkgoZmpIkFTI0JUkqZGhKklTI0JQkqZChKUlSIUNTkqRChqYkSYUMTUmSChmakiQVMjQlSSpkaEqSVMjQlCSpkKEpSVIhQ1OSpEKGpiRJhQxNSZIKGZqSJBUyNKX90Lve9S6e//znM2fOnEHXZybz589n1qxZvPjFL+Z73/vek+uuvfZaZs+ezezZs7n22mufbL///vs5/vjjmTVrFvPnzyczR/04pHZjaEr7ode//vXccMMNQ65ftGgRDz74IEuXLuUzn/kM733vewHYvHkzCxYs4JZbbmHRokUsWLCALVu2AHDxxRdz2WWXsXTpUh588EEWLVo0JscitRNDU9oPzZkzh4kTJw65fuHChZx11llEBMcddxw///nP2bBhA4sXL2bu3LlMnDiRww47jLlz53LrrbeyYcMGHnvsMY477jgigrPOOouFCxeO4RFJ7cHQlDrQ+vXrOfzww59c7unpYf369axbt2639nXr1rF+/Xp6enp26y91GkNTkqRChqbUgaZNm8bDDz/85PK6deuYNm0aPT09u7X39PQwbdo01q1bt1t/qdMYmlIHevnLX851111HZnLvvfdy6KGHMnXqVE4++WSWLFnCli1b2LJlC0uWLOHkk09m6tSpHHLIIdx7771kJtdddx2nnXZaqw9DGnMHtLoASSPvrW99K3fccQcbN27kqKOOYv78+TzxxBMAnHvuucybN49bbrmFWb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yc2aoapX3JAa0uQNLoyczHd4XlwBlL6jFmzwD+uhW1SfsizzSl/VBEHAo8NtzUXvUgB2cC1zYMpSdpGIamtB+KiC8A99SfNZn580H6HJaZW8a8OGkfZmhK+5mIeB3wNeDnwCbgFuCfgO8D6+pLtuOA64D/lZkPtKxYaR9jaEr7mYi4CtgJLABOB94EPBdYBSwEbgWOBC7PzIOG2o+k3Rma0n4kIg4A3g8cmpnzG9qPAt4GvAY4GDgM+HJmvqUlhUr7KENT2s9ExERgSmb+ez3B9I7GB4Ii4kzgWuDYzLy/VXVK+yJfOZH2M5m5Gdhcf98OEBHPoPqf5J3AocA2A1NqnqEpdYDM/FXD4iHAh1tVi7Qv8/Ks1GHq2Ux2DghSSQUMTUmSCjnLiSRJhQxNSZIKGZqSJBUyNCVJKmRoSpJU6P8DZRkz6O1HM2YAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 504x360 with 1 Axes>"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "simulator = Aer.get_backend('qasm_simulator')\n",
    "result = execute(circuit, backend=simulator, shots=1).result()\n",
    "from qiskit.visualization import plot_histogram\n",
    "plot_histogram(result.get_counts(circuit))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "In fact, setting the number of shots to 1000, we can still see that 100% of the results contain the secret number."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAc0AAAFbCAYAAAC3etVDAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAdh0lEQVR4nO3dfZRddX3v8ffXASS5QkjiNMlgUzJacRbSISS0NQhEIFbRtgpewYci+MDFB9AiarjXq8Vbda34BFdrEbRF0QLFqrU2FAhJhQIFQoIG06aGYnIlCUoelEZiQvzeP/YOHiYzk98JM3NOct6vtc6as3/7t/f57j/Ih/30+0VmIkmS9uwZrS5AkqR9haEpSVIhQ1OSpEKGpiRJhQxNSZIKHdDqAlpp8uTJOX369FaXIUlqI/fff/+jmdk92LqODs3p06ezePHiVpchSWojkyZNWjPUOi/PSpJUyNCUJKmQoSlJUiFDU5KkQoamJEmFDE1JkgoZmpIkFTI0JUkqZGhKklTI0JQkqZChKUlSIUNTkqRChqYkSYUMTUmSChmakiQVMjQlSSpkaEqSVMjQlCSpkKEpSVIhQ1OSpEKGpiRJhQxNSZIKGZqSJBUyNKX90Lve9S6e//znM2fOnEHXZybz589n1qxZvPjFL+Z73/vek+uuvfZaZs+ezezZs7n22mufbL///vs5/vjjmTVrFvPnzyczR/04pHZjaEr7ode//vXccMMNQ65ftGgRDz74IEuXLuUzn/kM733vewHYvHkzCxYs4JZbbmHRokUsWLCALVu2AHDxxRdz2WWXsXTpUh588EEWLVo0JscitRNDU9oPzZkzh4kTJw65fuHChZx11llEBMcddxw///nP2bBhA4sXL2bu3LlMnDiRww47jLlz53LrrbeyYcMGHnvsMY477jgigrPOOouFCxeO4RFJ7cHQlDrQ+vXrOfzww59c7unpYf369axbt2639nXr1rF+/Xp6enp26y91GkNTkqRChqbUgaZNm8bDDz/85PK6deuYNm0aPT09u7X39PQwbdo01q1bt1t/qdMYmlIHevnLX851111HZnLvvfdy6KGHMnXqVE4++WSWLFnCli1b2LJlC0uWLOHkk09m6tSpHHLIIdx7771kJtdddx2nnXZaqw9DGnMHtLoASSPvrW99K3fccQcbN27kqKOOYv78+TzxxBMAnHvuucybN49bbrmFWbNmMW7cOD73uc8BMHHiRC6++GJOOeUUAN73vvc9+UDRJz7xCd75zneybds2Tj31VE499dTWHJzUQtHJ71rNnDkzFy9e3OoyJEltZNKkSfdl5uzB1nl5VpKkQoamJEmFDE1JkgoZmpIkFTI0JUkqZGhKklTI0JQkqZCh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PtKxYaR9jaEr7mYi4CtgJLABOB94EPBdYBSwEbgWOBC7PzIOG2o+k3Rma0n4kIg4A3g8cmpnzG9qPAt4GvAY4GDgM+HJmvqUlhUr7KENT2s9ExERgSmb+ez3B9I7GB4Ii4kzgWuDYzLy/VXVK+yJfOZH2M5m5Gdhcf98OEBHPoPqf5J3AocA2A1NqnqEpdYDM/FXD4iHAh1tVi7Qv8/Ks1GHq2Ux2DghSSQUMTUmSCjnLiSRJhQxNSZIKGZqSJBUyNCVJKmRoSpJU6P8DZRkz6O1HM2YAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 504x360 with 1 Axes>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "simulator = Aer.get_backend('qasm_simulator')\n",
    "result = execute(circuit, backend=simulator, shots=1000).result()\n",
    "from qiskit.visualization import plot_histogram\n",
    "plot_histogram(result.get_counts(circuit))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# References"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Journal Papers\n",
    "\n",
    "1. Ethan Bernstein and Umesh Vazirani (1997) \"Quantum Complexity Theory\" SIAM Journal on Computing, Vol. 26, No. 5: 1411-1473, <a id='1' href='https://doi.org/10.1137/S0097539796300921'>doi:10.1137/S0097539796300921</a>).\n",
    "\n",
    "#### Tutorials\n",
    "For detailed information about Qiskit, check out the tutorials in the Github repository:\n",
    "\n",
    "https://github.com/Qiskit/qiskit-iqx-tutorials\n",
    "\n",
    "For a pedagogical presentation of the mathematics behind the Bernstein-Vazirani algorithm, check out our open-source `Learn Quantum Computation using Qiskit` textbook:\n",
    "\n",
    "https://community.qiskit.org/textbook/"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Version"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "It's good to note the Qiskit version that was used in your work. One way to do this is print the version at the bottom of the Jupyter notebook using"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'qiskit-terra': '0.9.0',\n",
       " 'qiskit-ignis': '0.2.0',\n",
       " 'qiskit-aqua': '0.6.0',\n",
       " 'qiskit': '0.12.0',\n",
       " 'qiskit-aer': '0.3.0',\n",
       " 'qiskit-ibmq-provider': '0.3.2'}"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "qiskit.__qiskit_version__"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style='width: 100%; background-color:#d5d9e0;padding-left: 10px; padding-bottom: 10px; padding-right: 10px; padding-top: 5px'><h3>This code is a part of Qiskit</h3><p>&copy; Copyright IBM 2017, 2019.</p><p>This code is licensed under the Apache License, Version 2.0. You may<br>obtain a copy of this license in the LICENSE.txt file in the root directory<br> of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.<p>Any modifications or derivative works of this code must retain this<br>copyright notice, and modified files need to carry a notice indicating<br>that they have been altered from the originals.</p></div>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import qiskit.tools.jupyter\n",
    "%qiskit_copyright"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
